Type iTunes_LibraryLoaderFactory Extends LibraryLoaderFactory

	Method CreateLoader:LibraryLoader(name:String)
		Local n:String = name.ToLower()
		Local strategy:iTunes_LibraryLoaderStrategy
		Select n
			Case "itunes"
				strategy = New iTunes_LibraryLoaderStrategy			
			Case "itunes-albums"
				strategy = New iTunes_LibraryLoaderAlbumStrategy			
			Default
				Return Null
		End Select
		?MacOs
		Local defaultXmlFileName:String = GetEnv_("HOME") + "/Music/iTunes/iTunes Music Library.xml"
		?Win32
		Local defaultXmlFileName:String = GetEnv_("HOMEPATH") + "/My Documents/My Music/iTunes/iTunes Music Library.xml"
		?Linux
		Local defaultXmlFileName:String = GetEnv_("HOME") + "/Music/iTunes/iTunes Music Library.xml"		
		?
		strategy.xmlFileName = Configuration.GetInstance().Get("iTunes.XML", defaultXmlFileName)
		Local libLoader:LibraryLoader = New LibraryLoader
		libLoader.strategy = strategy
		Return libLoader		 
	End Method

End Type

New iTunes_LibraryLoaderFactory